<?php

namespace app\admin\business;

class BusBase
{
    protected static $instance = [];

    /**
     * 单例
     * @return mixed|static
     */
    public static function getInstance()
    {
        if ((static::$instance[static::class] ?? null) instanceof static) {
            return static::$instance[static::class];
        }
        return static::$instance[static::class] = new static();
    }
}